﻿using System;
using System.Collections.Generic;
using System.Text;
using shun.PAPLib.Response;

namespace shun.PAPLib
{
    /// <summary>
    /// 当送出消息是错误格式的时候,抛出此异常,调用端需要捕获此异常
    /// </summary>
    public class BadMessageException : ApplicationException
    {   
        public BadMessageException(string xml) : base(xml)
        {            
            this.Source = xml;
            this.BadMessage = BadMessageResponse.Convert(xml);
        }
        /// <summary>
        /// 错误消息对象
        /// </summary>
        public BadMessageResponse BadMessage { get; set; }
    }
}
